home *** CD-ROM | disk | FTP | other *** search
- Path: news.worldlinx.com!news
- From: "J. Christian Blanchette" <jblanc@ivic.qc.ca>
- Newsgroups: comp.lang.c
- Subject: tc++: vram 4 K segment warp-around ?
- Date: Fri, 12 Jan 1996 14:19:54 -0800
- Organization: WorldLinx Telecommunications Inc.
- Message-ID: <30F6DE8A.20CD@ivic.qc.ca>
- NNTP-Posting-Host: ppp05.ivic.qc.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b4a (Win95; I; 16bit)
-
- /*
- * help me! i'm using tc++ 3.0, and the following code outputs:
- * p1 -> 3, p2 -> 3, p3 -> 3
- * can someone explain me this 4 K warp-around?
- *
- * [ in fact, what i really intend is to use vram as a 1 K aligned
- * buffer. if you have any other idea about how to achieve that (more
- * portably, i hope), tell me! ]
- */
-
- #include <dos.h>
-
- int main()
- {
- /* ptrs to video mem */
- int far *p1 = (int far *) MK_FP(0xA000, 0x0000);
- int far *p2 = (int far *) MK_FP(0xA000, 0x1000);
- int far *p3 = (int far *) MK_FP(0xB000, 0x1000);
-
- *p1 = 1;
- *p2 = 2;
- *p3 = 3;
-
- printf("p1 -> %x, p2 -> %x, p3 -> %x\n", *p1, *p2, *p3);
- return 0;
- }
-
- /*
- * jblanc@ivic.qc.ca is j. christian blanchette
- *
- * "i still remember, why don't you?"
- * - e.v.
- */
-
-